home *** CD-ROM | disk | FTP | other *** search
Wrap
function loadContentXml() { cd_content = new XML(); cd_content.ignoreWhite = true; cd_content.load(contPath); cd_content.onLoad = contentOnLoad; cd_content.load(contPath); } function contentOnLoad(success) { if(success) { updateContentXml(cd_content.firstChild.childNodes,[0]); } else { trace("fehler beim laden"); } } function updateContentXml(nodes_array, depth_array) { var _loc1_ = 0; while(_loc1_ < nodes_array.length) { depth_array[depth_array.length - 1] += 1; var _loc4_ = depth_array.join(".") + "."; nodes_array[_loc1_].attributes.index = _loc4_; if(nodes_array[_loc1_].hasChildNodes()) { updateContentXml(nodes_array[_loc1_].childNodes,depth_array.concat([0])); } _loc1_ = _loc1_ + 1; } if(depth_array.length == 1) { movie_navigation_pos_mc._visible = true; } } function generateSettings() { if(_global.$tweenManager == undefined) { _global.$tweenManager = new zigo.tweenManager(); } else { _global.$tweenManager.cleanUp(); _global.$tweenManager.init(); } com.robertpenner.easing.Back; com.robertpenner.easing.Bounce; com.robertpenner.easing.Circ; com.robertpenner.easing.Cubic; com.robertpenner.easing.Elastic; com.robertpenner.easing.Expo; com.robertpenner.easing.Linear; com.robertpenner.easing.Quad; com.robertpenner.easing.Quart; com.robertpenner.easing.Quint; com.robertpenner.easing.Sine; var Mp = MovieClip.prototype; Mp.addListener = function() { if(!this._listeners) { AsBroadcaster.initialize(this); } this.addListener.apply(this,arguments); }; ASSetPropFlags(Mp,"addListener",1,0); Mp.tween = function(props, pEnd, seconds, animType, delay, callback, extra1, extra2) { if(_global.$tweenManager.isTweenLocked(this)) { trace("tween not added, this movieclip is locked"); return undefined; } if(arguments.length < 2) { trace("tween not added, props & pEnd must be defined"); return undefined; } if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } if(!(pEnd instanceof Array)) { pEnd = [pEnd]; while(pEnd.length < props.length) { pEnd.push(pEnd[0]); } } if(seconds == undefined) { seconds = 2; } else if(seconds < 0.01) { seconds = 0; } if(delay < 0.01 || delay == undefined) { delay = 0; } switch(typeof animType) { case "string": animType = animType.toLowerCase(); if(animType == "linear") { var eqf = com.robertpenner.easing.Linear.easeNone; } else if(animType.indexOf("easeoutin") == 0) { var t = animType.substr(9); t = t.charAt(0).toUpperCase() + t.substr(1); var eqf = com.robertpenner.easing[t].easeOutIn; } else if(animType.indexOf("easeinout") == 0) { var t = animType.substr(9); t = t.charAt(0).toUpperCase() + t.substr(1); var eqf = com.robertpenner.easing[t].easeInOut; } else if(animType.indexOf("easein") == 0) { var t = animType.substr(6); t = t.charAt(0).toUpperCase() + t.substr(1); var eqf = com.robertpenner.easing[t].easeIn; } else if(animType.indexOf("easeout") == 0) { var t = animType.substr(7); t = t.charAt(0).toUpperCase() + t.substr(1); var eqf = com.robertpenner.easing[t].easeOut; } if(eqf == undefined) { var eqf = com.robertpenner.easing.Expo.easeOut; } break; case "function": var eqf = animType; break; case "object": if(animType.ease != undefined && animType.pts != undefined) { var eqf = animType.ease; extra1 = animType.pts; } else { var eqf = com.robertpenner.easing.Expo.easeOut; } break; default: var eqf = com.robertpenner.easing.Expo.easeOut; } switch(typeof callback) { case "function": callback = {func:callback,scope:this._parent}; break; case "string": var ilp; var funcp; var scope; var args; var a; ilp = callback.indexOf("("); funcp = callback.slice(0,ilp); scope = eval(funcp.slice(0,funcp.lastIndexOf("."))); func = eval(funcp); args = callback.slice(ilp + 1,callback.lastIndexOf(")")).split(","); var i = 0; while(i < args.length) { a = eval(args[i]); if(a != undefined) { args[i] = a; } i++; } callback = {func:func,scope:scope,args:args}; } if(_global.$tweenManager.autoStop) { _global.$tweenManager.removeTween(this); } if(delay > 0) { _global.$tweenManager.addTweenWithDelay(delay,this,props,pEnd,seconds,eqf,callback,extra1,extra2); } else { _global.$tweenManager.addTween(this,props,pEnd,seconds,eqf,callback,extra1,extra2); } }; Mp.stopTween = function(props) { if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } _global.$tweenManager.removeTween(this,props); }; Mp.isTweening = function(prop) { return _global.$tweenManager.isTweening(this,prop); }; Mp.getTweens = function() { return _global.$tweenManager.getTweens(this); }; Mp.lockTween = function() { _global.$tweenManager.lockTween(this,true); }; Mp.unlockTween = function() { _global.$tweenManager.lockTween(this,false); }; Mp.isTweenLocked = function() { return _global.$tweenManager.isTweenLocked(this); }; Mp.isTweenPaused = function(prop) { return _global.$tweenManager.isTweenPaused(this,prop); }; Mp.pauseTween = function(props) { var _loc4_ = undefined; if(props != undefined) { if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } _loc4_ = {}; for(var _loc5_ in props) { _loc4_[props[_loc5_]] = true; } } _global.$tweenManager.pauseTween(this,_loc4_); }; Mp.unpauseTween = function(props) { var _loc4_ = undefined; if(props != undefined) { if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } _loc4_ = {}; for(var _loc5_ in props) { _loc4_[props[_loc5_]] = true; } } _global.$tweenManager.unpauseTween(this,_loc4_); }; Mp.pauseAllTweens = function() { _global.$tweenManager.pauseTween(); }; Mp.unpauseAllTweens = function() { _global.$tweenManager.unpauseTween(); }; Mp.stopAllTweens = function() { _global.$tweenManager.stopAll(); }; Mp.ffTween = function(props) { var _loc4_ = undefined; if(props != undefined) { if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } _loc4_ = {}; for(var _loc5_ in props) { _loc4_[props[_loc5_]] = true; } } _global.$tweenManager.ffTween(this,_loc4_); }; Mp.rewTween = function(props) { var _loc4_ = undefined; if(props != undefined) { if(typeof props == "string") { if(props.indexOf(",") > -1) { props = props.split(" ").join("").split(","); } else { props = [props]; } } _loc4_ = {}; for(var _loc5_ in props) { _loc4_[props[_loc5_]] = true; } } _global.$tweenManager.rewTween(this,_loc4_); }; Mp.alphaTo = function(destAlpha, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_alpha"],[destAlpha],seconds,animType,delay,callback,extra1,extra2); }; Mp.scaleTo = function(destScale, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_xscale","_yscale"],[destScale,destScale],seconds,animType,delay,callback,extra1,extra2); }; Mp.sizeTo = function(destSize, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_width","_height"],[destSize,destSize],seconds,animType,delay,callback,extra1,extra2); }; Mp.slideTo = function(destX, destY, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_x","_y"],[destX,destY],seconds,animType,delay,callback,extra1,extra2); }; Mp.rotateTo = function(destRotation, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_rotation"],[destRotation],seconds,animType,delay,callback,extra1,extra2); }; _global.getColorTransObj = function(type, amt, rgb) { switch(type) { case "brightness": var _loc4_ = 100 - Math.abs(amt); var _loc6_ = 0; if(amt > 0) { _loc6_ = 256 * (amt / 100); } return {ra:_loc4_,rb:_loc6_,ga:_loc4_,gb:_loc6_,ba:_loc4_,bb:_loc6_}; case "brightOffset": _loc6_ = 256 * (amt / 100); return {ra:100,rb:_loc6_,ga:100,gb:_loc6_,ba:100,bb:_loc6_}; case "contrast": var _loc2_ = {}; var _loc0_ = null; _loc2_.ba = _loc0_ = amt; _loc2_.ga = _loc0_; _loc2_.ra = _loc0_; _loc2_.bb = _loc0_ = 128 - 1.28 * amt; _loc2_.gb = _loc0_; _loc2_.rb = _loc0_; return _loc2_; case "invertColor": _loc2_ = {}; _loc2_.ba = _loc0_ = 100 - 2 * amt; _loc2_.ga = _loc0_; _loc2_.ra = _loc0_; _loc2_.bb = _loc0_ = amt * 2.55; _loc2_.gb = _loc0_; _loc2_.rb = _loc0_; return _loc2_; case "tint": if(rgb == undefined || rgb == null) { break; } var _loc8_ = rgb >> 16; var _loc9_ = rgb >> 8 & 0xFF; var _loc7_ = rgb & 0xFF; var _loc5_ = amt / 100; _loc2_ = {rb:_loc8_ * _loc5_,gb:_loc9_ * _loc5_,bb:_loc7_ * _loc5_}; _loc2_.ba = _loc0_ = 100 - amt; _loc2_.ga = _loc0_; _loc2_.ra = _loc0_; return _loc2_; } return {rb:0,ra:100,gb:0,ga:100,bb:0,ba:100}; }; Mp.brightnessTo = function(bright, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("brightness",bright)],seconds,animType,delay,callback,extra1,extra2); }; Mp.brightOffsetTo = function(percent, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("brightOffset",percent)],seconds,animType,delay,callback,extra1,extra2); }; Mp.contrastTo = function(percent, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("contrast",percent)],seconds,animType,delay,callback,extra1,extra2); }; Mp.colorTo = function(rgb, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("tint",100,rgb)],seconds,animType,delay,callback,extra1,extra2); }; Mp.colorTransformTo = function(ra, rb, ga, gb, ba, bb, aa, ab, seconds, animType, delay, callback, extra1, extra2) { var _loc2_ = {ra:ra,rb:rb,ga:ga,gb:gb,ba:ba,bb:bb,aa:aa,ab:ab}; this.tween(["_ct_"],[_loc2_],seconds,animType,delay,callback,extra1,extra2); }; Mp.invertColorTo = function(percent, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("invertColor",percent)],seconds,animType,delay,callback,extra1,extra2); }; Mp.tintTo = function(rgb, percent, seconds, animType, delay, callback, extra1, extra2) { this.tween(["_ct_"],[getColorTransObj("tint",percent,rgb)],seconds,animType,delay,callback,extra1,extra2); }; Mp.getFrame = function() { return this._currentframe; }; Mp.setFrame = function(fr) { this.gotoAndStop(Math.round(fr)); }; Mp.addProperty("_frame",Mp.getFrame,Mp.setFrame); Mp.frameTo = function(endframe, duration, animType, delay, callback, extra1, extra2) { if(endframe == undefined) { endframe = this._totalframes; } this.tween("_frame",endframe,duration,animType,delay,callback,extra1,extra2); }; var TFP = TextField.prototype; if(!TFP.origAddListener) { TFP.origAddListener = TFP.addListener; ASSetPropFlags(TFP,"origAddListener",1,0); TFP.addListener = function() { if(!this._listeners) { AsBroadcaster.initialize(this); } this.origAddListener.apply(this,arguments); }; } var $_$methods = ["tween","stopTween","isTweening","getTweens","lockTween","isTweenLocked","unlockTween","isTweenPaused","pauseTween","unpauseTween","pauseAllTweens","unpauseAllTweens","stopAllTweens","ffTween","rewTween","getFrame","setFrame","_frame","frameTo","alphaTo","brightnessTo","colorTo","colorTransformTo","invertColorTo","tintTo","scaleTo","sizeTo","slideTo","rotateTo","brightOffsetTo","contrastTo"]; for(var $_$i in $_$methods) { ASSetPropFlags(Mp,$_$methods[$_$i],1,0); if($_$methods[$_$i].toLowerCase().indexOf("frame") == -1) { TFP[$_$methods[$_$i]] = Mp[$_$methods[$_$i]]; ASSetPropFlags(TFP,$_$methods[$_$i],1,0); } } delete Mp; delete TFP; delete $_$methods; delete $_$i; TextField.prototype.typeWriter = function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) { clearInterval(this.tw__interval); var originalTxt = arg1; this._visible = false; if(this.html) { this.htmlText = arg1; } else { this.text = arg1; } if(arg4 == undefined || null) { arg4 = ""; } var txt = this.text; var txt_length = txt.length; this.text = ""; if(this.autoSize == false || "none") { var last_visible_word = 0; var last_visible_character = 0; var txt_array = txt.split(" "); var temp_string = ""; var i = 0; while(i < txt_array.length) { temp_string += txt_array[i] + " "; this.text = temp_string; if(this.textHeight > this._height) { last_visible_character = temp_string.length; last_visible_word = i - 1; break; } i++; } if(last_visible_word == 0) { last_visible_character = txt_length; } } else { last_visible_character = txt_length; } this.text = ""; this._visible = true; txt_array = []; var w = 0; var dw = Math.acos((last_visible_character - 0.2) / last_visible_character); var characters_counter = 0; var characters = 0; var characters_basis = last_visible_character; var characters_div = 0; if(last_visible_character > arg3) { var characters = Math.round(last_visible_character * Math.sin(dw)); while(characters_counter < last_visible_character - arg3) { txt_array.push(txt.substring(characters_counter,characters_counter + characters)); characters_counter += characters; } characters_basis = last_visible_character - characters_counter; characters_div = characters_counter; dw = Math.acos((characters_basis - 0.2) / characters_basis); } var w = dw; while(w <= 1.5707963267948966) { characters = Math.round(characters_div + characters_basis * Math.sin(w)); if(characters <= characters_counter) { characters = characters_counter + 1; } if(characters >= last_visible_character) { characters = last_visible_character; txt_array.push(txt.substring(characters_counter,characters)); break; } txt_array.push(txt.substring(characters_counter,characters)); characters_counter = characters; w += dw; } temp_string = ""; var txtPfad = this; var tw__interval = this.tw__interval = setInterval(function() { if(eval(txtPfad) == undefined) { clearInterval(tw__interval); } if(txt_array.length > 0) { temp_string += txt_array.shift(); txtPfad.text = temp_string + arg4; } else { clearInterval(tw__interval); if(txtPfad.html) { txtPfad.htmlText = originalTxt; } else { txtPfad.text = originalTxt; } if(arg5) { txtPfad.styleSheet = arg5; } if(arg6) { arg6.apply(null,arg7); } } } ,arg2); }; ASSetPropFlags(TextField.prototype,"typeWriter",1,0); TextField.prototype.stringCutter_advanced = function(arg1, arg2) { var _loc8_ = this.textHeight; if(arg1 == undefined) { arg1 = " "; } var _loc4_ = 0; this.scroll = 1; while(this.maxscroll > 1) { var _loc2_ = 0; while(this.scroll <= 1 && _loc2_ < this.text.length) { _loc2_ = _loc2_ + 1; Selection.setFocus(this); this.scroll = 1; Selection.setSelection(0,_loc2_); } var _loc5_ = this.text.lastIndexOf("\r",_loc2_ - _loc4_); var _loc6_ = this.text.lastIndexOf(" ",_loc2_ - _loc4_); var _loc3_ = Math.max(_loc5_,_loc6_); if(_loc3_ == -1) { _loc3_ = _loc2_ - _loc4_ - arg1.length - 1; break; } Selection.setFocus(this); Selection.setSelection(_loc3_,this.length); this.replaceSel(arg1); this.scroll = 1; _loc4_ += 2; } if(arg2) { this.styleSheet = arg2; } }; ASSetPropFlags(TextField.prototype,"stringCutter_advanced",1,0); parseColor = function(_color) { parsed_color = parseInt("0x" + _color,16); return parsed_color; }; drawBox = function(clip, wSize, hSize, color1, color2, alpha1, alpha2, fillType) { colors = [color1,color2]; alphas = [alpha1,alpha2]; ratios = [0,255]; matrix = {matrixType:"box",x:0,y:0,w:wSize,h:hSize,r:1.5707963267948966}; clip.lineStyle(0,16777215,0); clip.beginGradientFill(fillType,colors,alphas,ratios,matrix); clip.lineTo(wSize,0); clip.lineTo(wSize,hSize); clip.lineTo(0,hSize); clip.lineTo(0,0); clip.endFill(); }; toolTip = function(_text_info, __mc, _align, _offset_x, _offset_y) { clearInterval(tooltip_delay); tooltip_delay = setTimeout(attachToolTip,250,_text_info,__mc,_align,_offset_x,_offset_y); }; attachToolTip = function(_text_info, __mc, _align, _offset_x, _offset_y) { offset_x = 0; offset_y = 0; if(_offset_x) { offset_x = _offset_x; } if(_offset_y) { offset_y = _offset_y; } __mc.attachMovie("tool_tip_mc","tool_tip_mc",__mc.getNextHighestDepth()); current_tool_tip = __mc.tool_tip_mc; current_tool_tip.text_info = _text_info; current_tool_tip.t_align = _align; current_tool_tip._x = -12 - offset_x; current_tool_tip._y = -30 - offset_y; clearInterval(tooltip_delay); tooltip_delay = setTimeout(killToolTip,tooltip_delay_time); }; killToolTip = function() { clearInterval(tooltip_delay); current_tool_tip.removeMovieClip(); }; } var cd_content; var contPath = "config/content.xml";